package team.yidong.fenda.wx.controller;

import com.qiniu.util.Json;
import net.sf.json.JSONArray;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import team.yidong.fenda.entity.HospitalModule;
import team.yidong.fenda.service.HospitalModuleService;

/**
 * Created by xuanlong on 2018/5/28.
 */
@Controller
public class WxHospitalModuleController {
    @Autowired
    HospitalModuleService hospitalModuleService;

    /**
     * 根据hospitalId返回微信小程序的四个模块的图标，名称，介绍
     *
     * @param hospitalId
     * @return
     */
    @RequestMapping("/wx/findHospitalModuleByHospitalId")
    @ResponseBody
    public JSONArray findByHospitalId(Integer hospitalId) {
        return hospitalModuleService.findByHospitalId(hospitalId);
    }
}
